package com.thymeleaf.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author ：hushengjin
 */
@Controller
@RequestMapping("/thymeleaf")
public class ThymeleafController {

    @GetMapping("/hello")
    public String hello(Model model) {
        String hello = "thymeleaf welcome!";
        model.addAttribute("msg", hello);
        return "demo1";
    }

}
